import { request } from './request'

export function getuserinfo () {
  return request({
    method: 'get',
    url: '/v1_0/user'
  })
}

export function setnewuserphoto (file) {
  return request({
    method: 'PATCH',
    url: '/v1_0/user/photo',
    data: file
  })
}

export function setuserinfo (userobj) {
  return request({
    method: 'PATCH',
    url: '/v1_0/user/profile',
    data: {
      name: userobj.name,
      birthday: userobj.birthday
    }
  })
}



export function getuser () {
  return request({
    method: 'get',
    url: '/v1_0/user/profile',
  })
}
